package com.neusoft.neuiotms.dcvm.service;

import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.neusoft.neuiotms.dcvm.bean.AttrBean;
import com.neusoft.neuiotms.dcvm.bean.StandardCiBean;

public interface AssetService {

    List<StandardCiBean> getLocDeepCi(String locCode, int deep);

    StandardCiBean getCiDetail(String code);

    StandardCiBean updateCiAttrs(String code, List<AttrBean> attrs);

    List<StandardCiBean> getAllCiByCatetories(String category);

    List<StandardCiBean> getAllCiBySchema(String schema);

    List<StandardCiBean> getAllCiByForeignInst(String foreignKey, String foreignValue);

    List<StandardCiBean> getAllCiByCatetoriesAndForeign(String category, String foreignKey, String foreignValue);

    List<StandardCiBean.SchemaDef> getAllSchemasByCatetories(String category);

    JSONObject createInstances(String instances);

    JSONObject updateInstancesAttrs(String code, List<AttrBean> attrs);

    JSONObject globalSearch(String name);

    JSONObject filter(String attrKey, String attrValue);

    /**
     * 机柜租赁情况统计
     *
     * @param PosCode
     * @return
     */
    List<JSONObject> rackLeaseStatus(String PosCode);

    /**
     * 机柜租赁类型统计
     *
     * @param PosCode
     * @return
     */
    List<JSONObject> rackType(String PosCode);

    /**
     * 机柜容量统计
     *
     * @param PosCode
     * @return
     */
    List<Map<String, Object>> rackCapacity(String PosCode);

    /**
     * 查询设备的位置<br />
     * 机柜内IT设备查询位置返回location和cabinet<br />
     * 配电柜内抽屉查询位置返回location和pdg_code<br />
     * 其他设备查询位置返回location<br />
     *
     * @param assetCode
     * @return
     */
    Map<String, Object> getAssetLocation(String assetCode);

    JSONObject deleteInstance(String code);
}
